
icpr$women_prison_pop <- icpr$women_prison_pop / 100 
icpr$country <- factor(icpr$Country,levels = icpr$Country[order(icpr$women_prison_pop,decreasing = T)],ordered = TRUE)


pdf("04_manuscript/figures/women_prison_pop.pdf",width = 10,height = 4.5)
print(icpr %>% ggplot(aes(x = country, y = women_prison_pop)) +
  geom_hline(yintercept = mean(icpr$women_prison_pop),size = .5) +
  geom_bar(stat = "identity",width = .8,alpha = .8) +
  scale_y_continuous(limits = c(0,1),
                     breaks = c(0:4/4, mean(icpr$women_prison_pop)),
                     labels = scales::percent,name = "Women as proportion\nof prison population") +
  scale_x_discrete(name = "") +
  theme_bw() +
  theme(axis.text.x = element_text(angle = 45,hjust = 1),
        panel.grid = element_blank()
        ) )
dev.off()


